package com.rec.smile.util;

public class TimeUtil {

	private static class TimeSystem {
		private final long offset;

		private TimeSystem(long offset) {
			super();
			this.offset = offset;
		}

		private long currentTimeMillis() {
			return System.currentTimeMillis() + offset;
		}

	}

	private TimeUtil() {
	}

	private static TimeSystem timeSystem = new TimeSystem(0);

	static void changeTime(long timeInMills) {
		timeSystem = new TimeSystem(timeInMills - System.currentTimeMillis());
	}

	public static long currentTimeMillis() {
		return timeSystem.currentTimeMillis();
	}

}
